#!/bin/bash
import socket
import ssl

context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
context.load_cert_chain(certfile="/home/never/voice-recording-app/ssl/cert.pem", keyfile="/home/never/voice-recording-app/ssl/key.pem")
context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
context.set_ciphers("ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384")
context.set_ecdh_curve("prime256v1")

# 启用会话缓存
context.options |= ssl.OP_NO_TICKET
context.load_dh_params("/home/never/voice-recording-app/ssl/dhparam.pem")

print("SSL配置已完成")
